// component/coupon-list.js
const config = require('../../config.js');
const request = require('../../utils/request.js')
const utils = require('../../utils/util.js');
var app = getApp()
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        searchParams: Object,
        isShow: Boolean,
        siteConfig:null,
    },
    attached: function () {
        let that = this;

        setTimeout(function () {
            that.setData({
                iscShow: true,
                siteConfig:app.globalData.WebSiteConfig
            })
        },100)
    },
    /**
     * 组件的初始数据
     */
    data: {
        couponList: null
    },
    /**
     * 组件的方法列表
     */
    methods: {
        _hideDialog(e) {
            console.log(e)
            let dataset = e.currentTarget.dataset;
            if (dataset.type == "1") {
                this.triggerEvent('closePop', {
                    type: 1
                });
            } else {
                this.triggerEvent('closePop', {
                    type: dataset.type,
                    item: dataset.item
                });
            }

        },
    },

})
